import request from '@/utils/request'
/**
 * 创建礼包销售
 * @returns
 */
export function addGiftPackSalesApi(data) {
  return request({
    method: 'post',
    url: '/operation/marCouponPackShop',
    data
  })
}

/**
 * 查询礼包销售列表
 * @returns
 */
export function getGiftPackSalesListApi(params) {
  return request({
    method: 'get',
    url: '/operation/marCouponPackShop',
    params
  })
}

/**
 * 编辑礼包销售
 * @returns
 */
export function editGiftPackSalesApi(data) {
  return request({
    method: 'put',
    url: '/operation/marCouponPackShop',
    data
  })
}
/**
 * 查询礼包销售详情
 * @returns
 */
export function getGiftPackSalesDetailsApi(id) {
  return request({
    method: 'get',
    url: `/operation/marCouponPackShop/${id}`
  })
}
/**
 * 上架礼包销售
 * @returns
 */
export function topGiftPackSalesApi(id) {
  return request({
    method: 'post',
    url: `/operation/marCouponPackShop/merchandize/${id}`
  })
}

/**
 * 下架礼包销售
 * @returns
 */
export function bottomGiftPackSalesApi(id) {
  return request({
    method: 'post',
    url: `/operation/marCouponPackShop/unshelve/${id}`
  })
}

/**
 * 礼包排序
 * @returns
 */
export function getGiftPackSortApi(params) {
  return request({
    method: 'get',
    url: `/operation/marCouponPackShop/findSort`,
    params
  })
}
